<template>
    <div id="app">
        <router-view />
    </div>
</template>
<script>
export default {
    methods: {
        rewriteAlert: function() {
            window.alert = function(name) {
                const iframe = document.createElement("IFRAME");
                iframe.style.display = "none";
                iframe.setAttribute("src", "data:text/plain,");
                document.documentElement.appendChild(iframe);
                window.frames[0].window.alert(name);
                iframe.parentNode.removeChild(iframe);
            };
        }
    },
    mounted() {
        // 重写alert
        this.rewriteAlert();
    }
};
</script>
<style>
#app {
    font-family: "PingFang SC", "Lantinghei SC", "Microsoft YaHei", "HanHei SC",
        "Helvetica Neue", "Open Sans", Arial, "Hiragino Sans GB", "微软雅黑",
        STHeiti, "WenQuanYi Micro Hei", SimSun, "Helvetica", sans-serif;
    height: 100%;
    overflow: hidden;
}
</style>
